package com.ddone.transaction;

import com.ddone.transaction.annotation.service.TopService;
import com.ddone.transaction.xml.service.EmpService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * @author ddone
 * @date 2024/3/20-18:33
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:application-tx.xml")
// @ContextConfiguration(classes = {TxConfig.class})
public class TransactionTest {
    @Autowired
    private EmpService empService;

    // @Autowired(required = false)
    // private TopService topService;

    @Test
    public void testTransfer(){
        empService.transfer(4,6,100);

    }

    // @Test
    // public void testPropagation(){
    //     topService.change(1,"tom22",300);
    // }
}
